public class SelectTimeMeasurer {

	public void selectTimeMeasurer() {

		long startTime2 = System.currentTimeMillis();
		int total = 0;
		for (int i = 0; i < 1000000000; i++) {
			for (int j = 0; j < 1000000000; j++) {
				total += i;
			}

		}

		long endTime2 = System.currentTimeMillis();

		System.out.println("Total millis time: " + (endTime2 - startTime2));

	}

	public void selectTimeMeasurer2() {
		long startTime = System.nanoTime();
		int total = 0;
		for (int i = 0; i < 1000000000; i++) {
			for (int j = 0; j < 1000000000; j++) {
				total += i;
			}

		}

		long endTime = System.nanoTime();

		System.out.println("Total nano time: " + (endTime - startTime)
				/ 1000000);
	}
}
